import Mock from 'mockjs'

let random = Mock.Random
export default {
	recommendList: () => {
		return {
			state: 200,
			method: 'get',
			code: 10000,
			requestId: random.string('lower', 15),
			path: '/ranking/recommends',
			message: '成功',
			timestamp: random.now('yyyy-MM-dd HH:mm:ss.SSSZ'),
			data: [{
					id: '1',
					type: 'article',
					title: random.title(4, 10),
					labels: [{
						id: 1,
						name: '本站'
					}, {
						id: 2,
						name: '关于'
					}],
					description: random.cparagraph(5, 30),
					createTime: random.datetime(),
					likeNum: random.character('number'),
					commentNum: random.character('number'),
					readNum: random.character('number')
				},
				{
					id: '1',
					type: 'article',
					title: random.title(4, 10),
					labels: [],
					description: random.cparagraph(5, 30),
					createTime: random.datetime(),
					likeNum: 100, // 喜欢数
					commentNum: 1000, // 评论数
					readNum: 2481, // 查看数
					top: 0
				},
				{
					id: '1',
					type: 'article',
					title: random.title(4, 10),
					labels: [],
					description: random.cparagraph(5, 30),
					createTime: random.datetime(),
					likeNum: 0, // 喜欢数
					commentNum: 0, // 评论数
					readNum: 0 // 查看数
				}
			]
		}
	},
	hottestList: () => {
		return {
			state: 200,
			method: 'get',
			code: 10000,
			requestId: random.string('lower', 15),
			path: '/ranking/hottests',
			message: '成功',
			timestamp: random.now('yyyy-MM-dd HH:mm:ss.SSSZ'),
			data: [{
					id: '1',
					type: 'article',
					title: random.title(4, 10),
					labels: [{
						id: 1,
						name: '本站'
					}, {
						id: 2,
						name: '关于'
					}],
					description: random.cparagraph(5, 30),
					createTime: random.datetime(),
					likeNum: random.integer(30000, 300000),
					commentNum: random.integer(30000, 300000),
					readNum: random.integer(30000, 300000)
				},
				{
					id: '1',
					type: 'article',
					title: random.title(4, 10),
					labels: [],
					description: random.cparagraph(5, 30),
					createTime: random.datetime(),
					likeNum: random.integer(300, 1000),
					commentNum: random.integer(300, 1000),
					readNum: random.integer(300, 1000),
					top: 0
				},
				{
					id: '1',
					type: 'article',
					title: random.title(4, 10),
					labels: [],
					description: random.cparagraph(5, 30),
					createTime: random.datetime(),
					likeNum: random.integer(20, 300),
					commentNum: random.integer(20, 300),
					readNum: random.integer(20, 300)
				}
			]
		}
	}
}
